import http from '@/utils/http'


//获取列表
export function getOrdersListApi() {
    return http({
        url: `/orders/list`,
        method: 'get',
    })
}
//添加
export function addOrdersApi(data) {
    return http({
        url: `/orders/add`,
        method: 'post',
        data,
    })
}

//根据id获取
export function getOrdersInfoByIdApi(id) {
    return http({
        url: '/orders/info/'+id,
        method: 'get',
    })
}

//根据id修改
export function updateOrdersInfoApi(data) {
    return http({
        url: `/orders/update`,
        method: 'put',
        data: data
    })
}

//根据id删除
export function deleteOrdersByIdApi(id) {
    return http({
        url: '/orders/delete/'+id,
        method: 'delete',
    })
}
